import request from "./request";

// 请求首页数据
export const GetHomeList = () => request.get("/index/index");
// 搜索历史和热门数据
export const GetSearchData = () => request.get("/search/index");
// 实时搜索
export const GetSearchList = (params) => request.get("/search/helper",{params});
//搜索结果
export const GetSearchResults = (params) => request.get("/goods/list",{params});
//清除搜索历史
export const ClearHistory = () => request.get("/search/clearhistory");
//专题
export const GetSubject = (params) => request.get("/topic/list",{params});
//分类
export const GetCate = () => request.get("/catalog/index");
//分类内容
export const GetCateCenter = (params) => request.get("/catalog/current",{params});
//用户
export const PostUser = (params) => request.post("/auth/loginByWeb",params);
//品牌详细
export const GetBrandDetail = (params) => request.get("/brand/detail",{params});
//五宫格
export const GetGoodsLists=(params)=>request.get("/goods/list",{params})
export const GetCategoryLists=(params)=>request.get("/goods/category",{params})
// 详细
export const GetDetail =(params)=>request.get("/goods/detail",{params})
export const GetRelated =(params)=>request.get("/goods/related",{params})
// 加入购物车
export const PostCartAdd =(params)=>request.post("/cart/add",params)
//获取购物车产品数量
export const GetCartGoodscount =(params)=>request.get("cart/goodscount",{params})
//购物车
    // 获取购物车数据（含完成编辑）
export const GetCartIndex =()=>request.get("/cart/index")
    // 点击切换商品选中状态（含全选）
export const PostCartChecked =(params)=>request.post("/cart/checked",params)
    // 商品步进器
export const PostCartUpdate =(params)=>request.post("/cart/update",params)
    //删除商品
export const PostCartDelete =(params)=>request.post("/cart/delete",params)

